import 'package:beautiful_demo/common/res.dart';
import 'package:beautiful_demo/common/widget/button.dart';
import 'package:beautiful_demo/common/widget/login.dart';
import 'package:drive/drive.dart';

import 'controller.dart';
import 'package:flutter/material.dart';
import 'package:flutter_mvc/flutter_mvc.dart';

///description:注册
class RegisterPage extends BasePage<RegisterController>{
   
   @override
   Widget build(BuildContext context){
     return SystemStateBar(
       child: Container(
         color: Colors.white,
         child: Stack(
           children: [
             Positioned.fill(
                 child: Container(
                   color: Colors.white,
                 )),
             Positioned(
               right: -230.dp,
               top: -230.dp,
               child:
               RadialWidget(460.dp, const [Colors.white, Color(0x33ff0000)]),
             ),
             Positioned(
               bottom: -150.dp,
               right: -150.dp,
               child:
               RadialWidget(300.dp, const [Colors.white, Color(0x33ffb700)]),
             ),
             Positioned(
               bottom: -120.dp,
               left: -120.dp,
               child:
               RadialWidget(220.dp, const [Colors.white, Color(0x27b4ff00)]),
             ),
             Positioned.fill(
                 child: KeyboardSpace(
                   child: SafeArea(
                     child: Container(
                       padding: EdgeInsets.only(left: 30.dp),
                       child: Column(
                         crossAxisAlignment: CrossAxisAlignment.start,
                         children: [
                           SizedBox(
                             height: 60.dp,
                           ),
                           Container(
                             width: 80.dp,
                             height: 80.dp,
                             alignment: Alignment.center,
                             decoration: BoxDecoration(
                                 color: Colors.white,
                                 borderRadius: BorderRadius.circular(8.dp),
                                 boxShadow: const [
                                   BoxShadow(color: Color(0x1f000000), blurRadius: 3)
                                 ]),
                             child: Image.asset(
                               "images/Icons8logo.png",
                               width: 70.dp,
                               height: 70.dp,
                             ),
                           ),
                           SizedBox(
                             height: 15.dp,
                           ),

                           SizedBox(
                             height: 40.dp,
                           ),
                           LoginEditWidget("昵称", "请输入昵称", c.textNickController),
                           SizedBox(
                             height: 20.dp,
                           ),
                           LoginEditWidget("手机号", "请输入账号", c.textPhoneController,keyType: TextInputType.phone,),

                           SizedBox(
                             height: 20.dp,
                           ),
                           LoginEditWidget("密码", "请输入密码", c.textPwdController,obscureText: true,),
                           SizedBox(
                             height: 20.dp,
                           ),
                           LoginEditWidget("确认密码", "请确认密码", c.textRePwdController,obscureText: true,),
                           SizedBox(
                             height: 60.dp,
                           ),
                           Row(
                             children: [
                               Expanded(
                                 flex: 2,
                                 child: DMainButton(
                                   "注册",
                                   null,
                                   40.dp,
                                   fontSize: 16.sp,
                                   borderRadius: 30.dp,
                                   onTap: c.onRegisterClick,
                                 ),
                               ),
                               SizedBox(width: 30.dp,)

                             ],
                           )
                         ],
                       ),
                     ),
                   ),
                 ))
           ],
         ),
       ),
     );
   }
}
